home *** CD-ROM | disk | FTP | other *** search
- Path: news.lpr.carel.fi!usenet
- From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
- Newsgroups: comp.lang.c++,comp.lang.c
- Subject: Re: debug before main()
- Date: Thu, 07 Mar 1996 16:05:15 +0200
- Organization: Carelcomp Forest
- Message-ID: <313EED1B.26B1@cmt.lpr.mail.carel.fi>
- References: <Pine.SOL.3.91.960305171701.17346B-100000@hamlet.uncg.edu>
- NNTP-Posting-Host: renoir.cclahti.carel.fi
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (WinNT; I)
-
- QIAN . ZHONG wrote:
- >
- > Hi, folks:
- >
- > What is the good way to debug the program before main(), I am using Borland
- > compiler, which generate a map file, and show the program entry point is
- > 0000:0000, relative memory start point,
- > how to load the program and start debug from 0000:0000 ?
- >
-
- Just load the program into debugger and bring up the disassembly window. You can
- step through the assembly code shown there. Or, the better way, some Borland
- systems come with the sources to the library startup code. Compile it with debug
- information and link that into your program instead of the traditional (c0l,cw0l
- etc) modules. Now, you can step through that code as if it were code you wrote.
- Note that most (if not all) of it is in assembly.
-
- Later,
- AriL
- --
- All my opinions are mine and mine alone.
-